package cn.thr.ymcc.web.controller;

import cn.thr.ymcc.result.JsonResult;
import cn.thr.ymcc.service.VerifycodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/verifycode")
public class VerifycodeController {
    @Autowired
    private VerifycodeService verifycodeService;

    /**
     * 发送短信验证码
     * @param phone
     * @return
     */
    @GetMapping("/sendSmsCode/{phone}")
    public JsonResult sendSmsCode(@PathVariable("phone")String phone){
        return verifycodeService.sendSmsCode(phone);
    }

}
